package com.xiamaliu.order;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class OrderTest {
    public static void main(String[] args) throws ParseException {
        Order order = new Order();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
        Date parse = sdf.parse("2024/03/08");
        order.setCreateTime(parse.getTime());

        OrderServiceStaticProxy proxy = new OrderServiceStaticProxy(new OrderService());
        proxy.createOrder(order);

        IOrderService orderService = (IOrderService) new OrderServiceDynamicProxy().getInstance(new OrderService());
        orderService.createOrder(order);
    }
}
